<!doctype html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Tomcat," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.1" />






<meta name="description" content="一、精简Tomcat和配置文件1．删除不需要的管理应用和帮助应用，提高tomcat安全性。  删除webapps下所有文件  1rm –fr $CATALINA_HOME/webapps/*  删除server/wenapps下所有文件  1rm –fr $CATALINA_HOME/server/webapps/* 2．精简sever.xml配置文件 &amp;#160;&amp;#160;&amp;#160;&amp;#16">
<meta name="keywords" content="Tomcat">
<meta property="og:type" content="article">
<meta property="og:title" content="tomcat 的优化配置">
<meta property="og:url" content="https://hcldirgit.github.io/2017/09/03/Tomcat/8. tomcat 的优化配置/index.html">
<meta property="og:site_name" content="失落的乐章">
<meta property="og:description" content="一、精简Tomcat和配置文件1．删除不需要的管理应用和帮助应用，提高tomcat安全性。  删除webapps下所有文件  1rm –fr $CATALINA_HOME/webapps/*  删除server/wenapps下所有文件  1rm –fr $CATALINA_HOME/server/webapps/* 2．精简sever.xml配置文件 &amp;#160;&amp;#160;&amp;#160;&amp;#16">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2017-09-02T17:37:09.663Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="tomcat 的优化配置">
<meta name="twitter:description" content="一、精简Tomcat和配置文件1．删除不需要的管理应用和帮助应用，提高tomcat安全性。  删除webapps下所有文件  1rm –fr $CATALINA_HOME/webapps/*  删除server/wenapps下所有文件  1rm –fr $CATALINA_HOME/server/webapps/* 2．精简sever.xml配置文件 &amp;#160;&amp;#160;&amp;#160;&amp;#16">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://hcldirgit.github.io/2017/09/03/Tomcat/8. tomcat 的优化配置/"/>





  <title>tomcat 的优化配置 | 失落的乐章</title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  




<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', '85*****1', 'auto');
  ga('send', 'pageview');
</script>


  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?87980c**************99ec5e26fb5";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>











  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">失落的乐章</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">技术面前，永远都是学生。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-message">
          <a href="/message" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-external-link"></i> <br />
            
            留言
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://hcldirgit.github.io/2017/09/03/Tomcat/8. tomcat 的优化配置/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="失落的乐章">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/0.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="失落的乐章">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">tomcat 的优化配置</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-03T02:13:44+08:00">
                2017-09-03
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="一、精简Tomcat和配置文件"><a href="#一、精简Tomcat和配置文件" class="headerlink" title="一、精简Tomcat和配置文件"></a>一、精简Tomcat和配置文件</h2><p>1．删除不需要的管理应用和帮助应用，提高tomcat安全性。</p>
<ul>
<li>删除webapps下所有文件</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">rm –fr <span class="variable">$CATALINA_HOME</span>/webapps/*</div></pre></td></tr></table></figure>
<ul>
<li>删除server/wenapps下所有文件</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">rm –fr <span class="variable">$CATALINA_HOME</span>/server/webapps/*</div></pre></td></tr></table></figure>
<p>2．精简sever.xml配置文件</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;使用tomcat发布版本中的最小配置文件，提高性能，如果有功能上的需求，在逐个的加入功能配置。</p>
<ul>
<li>备份原来的server.xml为server.xml_bak</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">mv server.xml server.xml_bak</div></pre></td></tr></table></figure>
<ul>
<li>复制server-minimal.xml为server.xml</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">cp server-minimal.xml server.xml</div></pre></td></tr></table></figure>
<h2 id="二、连接器优化"><a href="#二、连接器优化" class="headerlink" title="二、连接器优化"></a>二、连接器优化</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;在$CATALINA_HOME/conf/server.xml配置文件中的Connetctor节点，和连接数相关的参数配置和优化。</p>
<h3 id="maxThreads"><a href="#maxThreads" class="headerlink" title="maxThreads"></a>maxThreads</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Tomcat使用线程来处理接收的每个请求。这个值表示Tomcat可创建的最大的线程数。默认值200。 可以根据机器的时期性能和内存大小调整，一般可以在400-500。最大可以在800左右。</p>
<h3 id="acceptCount"><a href="#acceptCount" class="headerlink" title="acceptCount"></a>acceptCount</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;指定当所有可以使用的处理请求的线程数都被使用时，可以放到处理队列中的请求数，超过这个数的请求将不予处理。默认值10。 </p>
<h3 id="minSpareThreads"><a href="#minSpareThreads" class="headerlink" title="minSpareThreads"></a>minSpareThreads</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Tomcat初始化时创建的线程数。默认值4。 </p>
<h3 id="maxSpareThreads"><a href="#maxSpareThreads" class="headerlink" title="maxSpareThreads"></a>maxSpareThreads</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;一旦创建的线程超过这个值，Tomcat就会关闭不再需要的socket线程。默认值50。 </p>
<h3 id="enableLookups"><a href="#enableLookups" class="headerlink" title="enableLookups"></a>enableLookups</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;是否反查域名，默认值为true。为了提高处理能力，应设置为false </p>
<h3 id="connnectionTimeout"><a href="#connnectionTimeout" class="headerlink" title="connnectionTimeout"></a>connnectionTimeout</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;网络连接超时，默认值20000，单位：毫秒。设置为0表示永不超时，这样设置有隐患的。通常可设置为30000毫秒。(本系统由于与后台系统接口超时时间较长，使用设置为60000) </p>
<h3 id="maxKeepAliveRequests"><a href="#maxKeepAliveRequests" class="headerlink" title="maxKeepAliveRequests"></a>maxKeepAliveRequests</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;保持请求数量，默认值100。 </p>
<h3 id="bufferSize"><a href="#bufferSize" class="headerlink" title="bufferSize"></a>bufferSize</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;输入流缓冲大小，默认值2048 bytes。 </p>
<h3 id="compression"><a href="#compression" class="headerlink" title="compression"></a>compression</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;压缩传输，取值on/off/force，默认值off。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;其中和最大连接数相关的参数为maxThreads和acceptCount。如果要加大并发连接数，应同时加大这两个参数。web server允许的最大连接数还受制于操作系统的内核参数设置，通常Windows是2000个左右，Linux是1000个左右。 </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Tomcat中如何禁止和允许列目录下的文件 </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;在$CATALINA_HOME/conf/web.xml中，把listings参数设置成false即可，如下： </p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">listings</div><div class="line"><span class="literal">false</span></div><div class="line">...</div></pre></td></tr></table></figure>
<h3 id="具体操作"><a href="#具体操作" class="headerlink" title="具体操作"></a>具体操作</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">vi <span class="variable">$CATALINA_HOME</span>/conf/server.xml</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;修改用于AJP的连接：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">&lt;Connector port=<span class="string">"8009"</span> protocol=<span class="string">"AJP/1.3"</span> /&gt;</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;为：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">&lt;Connector port=<span class="string">"8009"</span></div><div class="line">               maxTreads=<span class="string">"500"</span> minSpareThreads=<span class="string">"10"</span> maxSpareThreads=<span class="string">"50"</span></div><div class="line">               acceptCount=<span class="string">"50"</span> connectionTimeout=<span class="string">"60000"</span></div><div class="line">               enableLookups=<span class="string">"false"</span> redirectPort=<span class="string">"8443"</span> protocol=<span class="string">"AJP/1.3"</span> /&gt;</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;修改通用连接：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">&lt;Connector port=<span class="string">"8080"</span> /&gt;</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;为：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">&lt;Connector port=<span class="string">"8080"</span></div><div class="line">               maxTreads=<span class="string">"500"</span> minSpareThreads=<span class="string">"10"</span> maxSpareThreads=<span class="string">"50"</span></div><div class="line">               acceptCount=<span class="string">"50"</span> connectionTimeout=<span class="string">"60000"</span></div><div class="line">               enableLookups=<span class="string">"false"</span> redirectPort=<span class="string">"8443"</span> protocol=<span class="string">"AJP/1.3"</span></div><div class="line">           compression=<span class="string">"on"</span></div><div class="line">           compressionMinSize=<span class="string">"2048"</span></div><div class="line">           noCompressionUserAgents=<span class="string">"gozilla, traviata"</span></div><div class="line">           compressableMimeType=<span class="string">"text/html,text/xml"</span>/&gt;</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;修改主机和应用配置：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">&lt;Host name=<span class="string">"localhost"</span> appBase=<span class="string">"webapps"</span> /&gt;</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;为：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">&lt;Host name=<span class="string">"localhost"</span> appBase=<span class="string">" "</span></div><div class="line">       unpackWARs=<span class="string">"true"</span> autoDeploy=<span class="string">"true"</span></div><div class="line">       xmlValidation=<span class="string">"false"</span> xmlNamespaceAware=<span class="string">"false"</span>&gt;</div><div class="line">        &lt;Context path=<span class="string">""</span> docBase=<span class="string">"/www/xxxx/site/web"</span> reloadable=<span class="string">"true"</span> debug=<span class="string">"0"</span>/&gt;</div><div class="line">      &lt;/Host&gt;</div></pre></td></tr></table></figure>
<h2 id="三、优化JDK"><a href="#三、优化JDK" class="headerlink" title="三、优化JDK"></a>三、优化JDK</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Tomcat默认可以使用的内存为128MB,Windows下,在文件{tomcat_home}/bin/catalina.bat，Unix下，在文件$CATALINA_HOME/bin/catalina.sh的前面，增加如下设置： </p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">JAVA_OPTS=<span class="string">'$JAVA_OPTS -Xms[初始化内存大小] -Xmx[可以使用的最大内存]</span></div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;或设置环境变量：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="built_in">export</span> JAVA_OPTS=”<span class="variable">$JAVA_OPTS</span> -Xms[初始化内存大小] -Xmx[可以使用的最大内存]”</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;一般说来，你应该使用物理内存的 80% 作为堆大小。如果本机上有Apache服务器，可以先折算Apache需要的内存，然后修改堆大小。建议设置为70％；建议设置[[初始化内存大小]等于[可以使用的最大内存]，这样可以减少平凡分配堆而降低性能。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;本例使用加入环境变量的方式：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">vi /etc/profile</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;加入：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="built_in">export</span> JAVA_OPTS=”<span class="variable">$JAVA_OPTS</span> -Xms700 –Xmx700</div></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="built_in">source</span> /etc/profile</div></pre></td></tr></table></figure>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Tomcat/" rel="tag"># Tomcat</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/09/03/Tomcat/9. tomcat 性能优化/" rel="next" title="tomcat 性能优化">
                <i class="fa fa-chevron-left"></i> tomcat 性能优化
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/09/03/Zabbix/1. 分布式系统监视 zabbix/" rel="prev" title="分布式系统监视 zabbix">
                分布式系统监视 zabbix <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/0.png"
               alt="失落的乐章" />
          <p class="site-author-name" itemprop="name">失落的乐章</p>
           
              <p class="site-description motion-element" itemprop="description">失落的乐章的Blog</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/">
                <span class="site-state-item-count">627</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">38</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/hcldirgit" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#一、精简Tomcat和配置文件"><span class="nav-number">1.</span> <span class="nav-text">一、精简Tomcat和配置文件</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#二、连接器优化"><span class="nav-number">2.</span> <span class="nav-text">二、连接器优化</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#maxThreads"><span class="nav-number">2.1.</span> <span class="nav-text">maxThreads</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#acceptCount"><span class="nav-number">2.2.</span> <span class="nav-text">acceptCount</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#minSpareThreads"><span class="nav-number">2.3.</span> <span class="nav-text">minSpareThreads</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#maxSpareThreads"><span class="nav-number">2.4.</span> <span class="nav-text">maxSpareThreads</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#enableLookups"><span class="nav-number">2.5.</span> <span class="nav-text">enableLookups</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#connnectionTimeout"><span class="nav-number">2.6.</span> <span class="nav-text">connnectionTimeout</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#maxKeepAliveRequests"><span class="nav-number">2.7.</span> <span class="nav-text">maxKeepAliveRequests</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#bufferSize"><span class="nav-number">2.8.</span> <span class="nav-text">bufferSize</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#compression"><span class="nav-number">2.9.</span> <span class="nav-text">compression</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#具体操作"><span class="nav-number">2.10.</span> <span class="nav-text">具体操作</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#三、优化JDK"><span class="nav-number">3.</span> <span class="nav-text">三、优化JDK</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">失落的乐章</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script>



  


  




	





  





  





  






  





  

  

  

  

  

  

</body>
</html>
